<?php
class product extends CP_Controller {

    function __construct() {
        parent::__construct('album','album_','id');
    }
	
	function index(){
        $data = $this->db
                ->select('product_id as id,product_title as title')
                ->like('product_title',$q)
				->where('product_id <>',$Id)
                ->from($this->table)
                ->order_by('product_insert', 'DESC')
                ->limit(10)
                ->get()
				->result();
    }
	
	function tokeninput($Id=0){
        $q=$this->input->get_post('q');
        $data = $this->db
                ->select('product_id as id,product_title as title')
                ->like('product_title',$q)
				->where('product_id <>',$Id)
                ->from($this->table)
                ->order_by('product_insert', 'DESC')
                ->limit(10)
                ->get()
				->result();
        $R=$data;
        $this->output->set_header('Content-type: application/json');
        $this->output->set_output(json_encode($R));
    }
	
    
}

?>